<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script type="module">
    import {
      getMaxInArrEs5, getMaxInArrEs6,
      cloneArrEs5, cloneArrEs6
    } from './shared.js';
    let a = [{ foo: 1 }, { bar: 2 }];
    // console.log(getMaxInArrEs5(a))
    // console.log(getMaxInArrEs6(a))
    let b = cloneArrEs6(a);
    // let c = cloneArrEs5(a);
    console.log(b[0] === a[0])
    // b[0] = 3;
    // c[0] = 3;
    // console.log(a[0]);

    // const a1 = [{ foo: 1 }];
    // const a2 = [{ bar: 2 }];

    // const a3 = a1.concat(a2);
    // const a4 = [...a1, ...a2];

    // console.log(a3[0] === a1[0]); // true
    // console.log(a4[0] === a1[0]); // true
  </script>
</body>

</html>